/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package upc.epe.dw.Conexion;

import javax.naming.Context;
import javax.naming.InitialContext;
import javax.sql.DataSource;

/**
 *
 * @author SONY
 */
public class Conexion {
  
  private DataSource ds;

  public DataSource Conexion(){
    try{
      Context ctx = new InitialContext();
      ds = (DataSource) ctx.lookup("DsHotel");    
    }catch(Exception  e){
      e.printStackTrace();
    } 
    return ds;
  }
 
}
